import request from '@/utils/request'

// 查询辅导员列表
export function listAssistant(query) {
  return request({
    url: '/employee/assistant/list',
    method: 'get',
    params: query
  })
}

// 查询辅导员详细
export function getAssistant(userId) {
  return request({
    url: '/employee/assistant/' + userId,
    method: 'get'
  })
}

// 新增辅导员
export function addAssistant(data) {
  return request({
    url: '/employee/assistant',
    method: 'post',
    data: data
  })
}

// 修改辅导员
export function updateAssistant(data) {
  return request({
    url: '/employee/assistant',
    method: 'put',
    data: data
  })
}

// 删除辅导员
export function delAssistant(userId) {
  return request({
    url: '/employee/assistant/' + userId,
    method: 'delete'
  })
}

// 导入
export function importData(data) {
  return request({
    url: '/employee/assistant/importData',
    method: 'post',
    data: data,
    headers: {
      "Content-Type": "multipart/form-data",//配置header，我们上传的文件编码格式就是multipart/form-data
    }
  })
}
